package com.xing.zrtest;

/**
 * @Author: ljx
 * @Date: 2021-05-25 17:54
 */
public class TestDG {

    private static final int RETRY_COUNT = 2;

    private boolean syncEsRetry(int retry) {
        if (retry < RETRY_COUNT) {
            // 索引数据插入或者更新
            if (false) {
                return true;
            } else {
                System.out.println(retry);
                int _retry = ++ retry;
                return syncEsRetry(_retry);
            }
        }
        return false;
    }

    public static void main(String[] args) {
        new TestDG().syncEsRetry(0);
    }

}
